1. Field of the Invention
The present invention relates to a printing apparatus, and to a control method and information recording medium for the same. More specifically, the present invention relates to a printing apparatus wherein a process can be selected to be run after recovering from an off-line status, to a method for controlling the printing apparatus, and to an information recording medium for recording the control method.
2. Description of the Related Art
Today, many common cash registers and desktop calculators are equipped with a printer. These printers are typically used for printing sales receipts, delivery records, rental receipts, and other types of documents containing a certain type of information and format on a single- or multiple-part form.
One type of form used in these printers has perforations defining form units of a specific length in which the particular information is printed. Another type is simply roll paper on which information is printed and the form is then automatically cut or manually torn to an appropriate length. The paper unit printed with a specific set of information is referred to below as a receipt. It should be further noted that some receipts may be the same length as one another, while others will differ in length.
FIG. 1 is a block diagram of the basic configuration of a printer 101 according to the present invention but is discussed at this point with reference to aspects of the related art. Print data or control data is sent to the printer 101 from a host 102, which is typically a computer or other data processing device, and is received through interface 103. Received data is temporarily stored in receive buffer 104, which is commonly a ring buffer.
The host 102 may be integrated with the printer in a cash register or desktop calculator in which the printer is incorporated, or it may be a stand-alone general-purpose or specialized computer separate from the printer. Thus, the host 102 could be any device capable of sending data to the printer.
When the host 102 is a computer, a program for controlling the printer 101 typically runs on the host 102. The printer control program run on the host can be easily updated and distributed to users by recording it to a floppy disk, hard disk, CD-ROM, or other computer-readable medium 112. It could also be distributed electronically via a telecommunications network 114.
A CPU 105 in the printer 101 sequentially reads data from the receive buffer 104. If print data indicating text to be printed is read from the receive buffer 104, the CPU 105 reads the font information from a font read only memory (ROM) 106, and buffers the information to be printed to a print buffer 107.
When the CPU 105 reads control commands from the receive buffer 104, it controls the printer 101 according to the received commands. For example, if the control commands are printer definitions (settings), the CPU 105 updates the corresponding printer definitions (settings) stored in storage device 108, which may be a random access memory (RAM). These printer definitions (settings) are referenced when the font information is expanded into the print buffer 107, and include, for example, print ratio settings for enlarged or reduced printing, text attributes such as bold, inverted, and underline, the line feed distance, and the definition of external fonts.
When the print buffer 107 becomes full, or when a line return command or other command initializing printing is detected, the CPU 105 controls the print head 109 or form feed mechanism 110 based on the content of the print buffer 107 to print the content of the print buffer 107 on paper. When one line of printing is completed, the paper is advanced, and the print buffer 107 is cleared.
Printer operation as described above is controlled by the CPU 105 using a control program stored in program ROM 111 or other storage medium. When the printer 101 power is turned on, the CPU 105 loads this program from program ROM 111 and begins operation.
To enable this printer-side control program to be updated as needed, program ROM 111 may be replaced by SRAM, flash ROM, or other type of non-volatile rewritable memory. Alternatively, the printer control program could be stored on floppy disk, hard disk, CD-ROM, or other data storage medium separate from the printer 101, similarly to the control program on the host side.
Processing by the printer may also be interrupted for a variety of reasons. When this occurs, the printer is said to be xe2x80x9coff-line.xe2x80x9d When the problem causing the printer to go off-line is resolved and the printer starts processing again, it is said to xe2x80x9cresume operation.xe2x80x9d
Some possible causes for a printer to go off-line are described below.
(a) No paper (depleted paper supply).
Using roll paper or continuous perforated forms makes it possible to print a large number of forms and replenish the paper supply less frequently. There is, however, still a finite number of forms that can be printed before the paper supply must be replenished. Printer operation can typically be resumed once the paper supply is replenished.
(b) Paper jam occurs during printing.
This condition occurs when the paper is not advanced normally, or jams with a paper fold obstructing print head (carriage) movement. Printer operation can resume once the paper jam is removed.
(c) Overheated print head, resulting from printing continuously for an extended period of time.
When the print head overheats, print head damage can occur and print quality deteriorates. The printer therefore enters an off-line state until the print head temperature drops, and then resumes operation.
(d) The user manually sets the printer off-line.
This can happen, for example, when the user presses an off-line switch on the operating panel of the printer, or opens the printer cover.
It should be noted that none of these off-line conditions necessarily occurs between forms, i.e., after printing of one form or sheet has been completed and before printing of the next form or sheet is started. It is therefore common for the printer to go off-line while in the middle of printing information on a single form.
Current printers typically resume operations with a predetermined operation of reprinting the whole page during which the problem occurred. However, in some printing operations, it is not always preferable to reprint the whole page. For example, in a printing operation in which a sales receipt, coupon and warranty are sequentially printed in one transaction, it is preferable to reprint necessary pages in accordance with how many pages are jammed. Moreover, if an amount of print data usually sent to a printer exceeds the capacity of a receive buffer in the printer, it is preferable to cancel the print job in case of paper jamming.
There is therefore a need for the ability to change the xe2x80x9cresume operationxe2x80x9d, i.e., the process or function performed by the printer when it resumes operation, in accordance with what printing operation the host is directing the printer to perform.
To meet the above-described needs, an object of the present invention is to provide a printing apparatus capable of resuming operation from an off-line state without printing a wasteful partial receipt and while retaining printer definitions (settings) stored in printer memory. The present invention is further directed to a control method for the printing apparatus, and to an information recording medium for storing the control method as a series of program instructions that can be executable on a machine.
To achieve the above objects, a printing apparatus for printing based on commands or print data received from a host device comprises: a receiver that receives print data or commands; a buffer that stores the print data or commands received by the receiver; a printing unit that prints according to the print data or commands stored in the buffer; an operation setting section that sets the operation to be performed when the printing apparatus resumes operation from an off-line state, based on a first command from the host device; and a controller that performs the resume operation set by the operation setting section to be performed when the printing apparatus resumes operation from an off-line state.
It is therefore possible with a printing apparatus according to the present invention to preselect the operation to be performed when the printing apparatus resumes operation from an off-line state.
The resume operations that can be performed following an off-line state include resuming printing from the beginning of the area that was being printed when the printing apparatus went off-line.
It is therefore possible to continue a printing process when operation is resumed from an off-line state. It is also possible to resume printing from the beginning of a line that was being printed when the printer went off-line. In the case of a so-called page mode printer, printing can be resumed from the beginning of the printing area that was being printed when the printer went off-line.
The resume operations that can be performed following an off-line state further include continuing execution of a command that was being processed when the printing apparatus went off-line. This makes it possible to continue processing a command that was in the middle of being processed.
The resume operations that can be performed following an off-line state also include clearing buffered print data or commands. This makes it possible to ignore print data that has not been printed when the printing apparatus resumes operation from an off-line state.
The resume operations that can be performed following an off-line state also include stopping a command that was being processed when the printing apparatus went off-line. This makes it possible to ignore commands that had not been processed when the printing apparatus resumes operation from an off-line state.
A printing apparatus according to another embodiment of the present invention further comprises a specification section for storing selection information specifying a particular print data or command stored in the buffer based on a second command from the host device. In this case, the resume operations that can be performed following an off-line state further include an operation for printing from the print data or command stored in the buffer and selected based on the selection information stored in the specification section.
With this version of the invention, it is possible to resume printing from a predetermined point in the print data stream when the printing apparatus resumes operation from an off-line state.
In a printing apparatus according to another embodiment of the present invention, the specification section also stores the printer definitions (settings). In this case, the resume operations that can be performed following an off-line state further include an operation resetting the printing apparatus to the printer definitions stored by the specification section. It thus becomes possible to restore previous printer definitions when printing is resumed.
A printing apparatus according to yet another embodiment of the present invention further comprises a notification section which informs the host device of the result of a resume operation following an off-line state. This makes it possible to request that the print data be re-sent in the event the resume operation fails.
The present invention can also be provided as a control method for a printing apparatus. The control method in this case achieves the same operation and benefits as described above.
A printing apparatus control method according to the present invention can also be provided as a control program to be run by the controller of the printing apparatus. This control program can be supplied using a recording medium on which the control program is recorded. The control program can also be transferred via the Internet or other computer network, for example, for recording by the user on a recording medium accessible to the user""s computer or printing apparatus.
An information processing device for sending print data or commands to a printing apparatus to which it is connected for controlling the printing apparatus, in accordance with the present invention, comprises: a transmitter which sends a command directing the printing apparatus what operation to perform when the printing apparatus resumes operation from an off-line state; a receiver which receives from the printing apparatus notification concerning the result of a resume operation following an off-line state; and a re-sending section which resends print data or commands when the receiver receives notification from the printing apparatus that the resume operation could not be successfully completed.
By means of this version of the present invention, it is possible to achieve the desired print results when the resume operation to be performed by the printing apparatus after an off-line state fails by resending the print data from a host computer or other information processing device.
The present invention can also be provided as a control method for an information processing device. The control method in this case achieves the same operation and benefits as described above.
An information processing device control method according to the present invention can also be provided as a control program to be run by the controller of the information processing device. This control program can be supplied using a recording medium on which the control program is recorded. The control program can also be transferred via the Internet or other computer network, for example, for recording by the user on a recording medium accessible to the user""s computer or printing apparatus.